package com.kaifamiao.comparing;

public class Panda {

    // 用来存储 对象标识(zhi)符 的字段(field)
    private Integer oid;
    private String name;
    private int age;
    private int weight;

    public Panda(Integer id, String name, int age, int weight) {
        oid = id;
        this.name = name;
        this.age = age;
        this.weight = weight;
    }

    @Override
    public String toString() {
        return String.format("(%d,%s,%d,%d)", oid, name, age, weight );
    }

    // 对象标识(zhi)符属性(object identifier property)
    // getId() ==剔除get和参数部分==> Id ==首字母变小写==> id (属性(property))
    public Integer getId() {
        return oid;
    }

    // setId(Integer) ==剔除get和参数部分==> Id ==首字母变小写==> id (属性(property))
    public void setId(Integer id) {
        this.oid = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getWeight() {
        return weight;
    }

    public void setWeight(int weight) {
        this.weight = weight;
    }
}
